<template>
  <n-config-provider
    :theme="darkTheme"
    :hljs="hljsTheme"
    :locale="locale"
    :date-locale="dateLocale"
    :theme-overrides="overridesTheme"
  >
    <go-app-provider>
      <I18n></I18n>
      <router-view></router-view>
    </go-app-provider>
  </n-config-provider>
</template>

<script lang="ts" setup>
import { NConfigProvider } from 'naive-ui'
import { GoAppProvider } from '@/components/GoAppProvider'
import { I18n } from '@/components/I18n'
import { useDarkThemeHook, useThemeOverridesHook, useCode, useLang } from '@/hooks'

// 暗黑主题
const darkTheme = useDarkThemeHook()

// 主题配置
const overridesTheme = useThemeOverridesHook()

// 代码主题
const hljsTheme = useCode()

// 全局语言
const { locale, dateLocale } = useLang()

</script>


<style lang="scss">
.h100{
    height: 100%;
}
.w100{
    width: 100%;
}
.fd,.aic,.jcc,.jcb,.jca,.fdc,.jcfend{
    display: flex;
}
.aic{
align-items: center;
}
.jcc{
    justify-content: center;
}
.jcb{
    justify-content: space-between; 
}
.jca{
    justify-content: space-around; 
}
.jcfend{
    justify-content: flex-end 
}
.aifstart{
    align-items: flex-start;
}
.fdc{
    flex-direction: column;
}
.flexWrap{
    flex-wrap: wrap;
}
.flexNoWrap{
    flex-wrap:nowrap !important;
}
.flex-shrink0{
    flex-shrink: 0;
}
.flex1{
    flex: 1;
}
.flex2{
    flex:2;
}
.flex5{
    flex: 5;
}
.flex7{
    flex: 7;
}
.CP{
    cursor: pointer;
}

.mt20{
    margin-top: 20px;
}

</style>